package model.behaviors;

import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import model.Figure;
import model.Move;

/**
 * basic interface for figure behavior
 */
public interface Behavior {

    /**
     * gets the image of delegated figure type
     * 
     * @return a BufferedImage of a the figure
     */
    BufferedImage getImg();

    /**
     * gets the x/y values (describing board fields) this figure can move to
     * 
     * @return list of valid fields as ArrayList<int[]>
     */
    ArrayList<int[]> getValidFields();

    /**
     * checks if the given position, as a String, is a valid field or nor
     * 
     * @param pos
     *            the position to check
     * @return boolean values, true if the given position is a valid field
     */
    boolean isValidField( String pos );

    /**
     * draws rectangle markers on the board fields, where this specific figure can possibly move to
     * 
     * @param fs
     *            size of a field on the playing field
     * @param g
     *            the graphics object to draw on
     * @param figMap
     *            reference to the list of unbeaten figures in this match
     * @param figure
     *            reference to selected figure
     * @param movesList
     *            reference to list of moves
     */
    void detectPossibleMoves( int fs, Graphics2D g, HashMap<String, Figure> figMap, Figure figure, List<Move> movesList );
}
